#ifndef METRIC_OBJECT_H
#define METRIC_OBJECT_H

#include <string>

#include "Metadata.h"
#include "Parser.h"

// This is just a virtual class.
// It defines an object which admits a metric,
// ie, a distance function.
//
class Metric_Object {
public:
    typedef enum {
        WORD,
        GENE,
        POINT,
        POINT2,
        UNKNOWN
     } Type;

    virtual ~Metric_Object() {};

    double distance(const Metric_Object *other);

    // Abstract methods.  Implementers must give these a body.

    // Distance calculation
    virtual double metric(const Metric_Object *other) const = 0;

    // Comparison
//    virtual bool operator==(const Metric_Object *other) const = 0;

    // Input
    virtual void parse(Parser& parser,
                       const Metadata& file_info,
                       std::string& name) = 0;
    // Output
    virtual std::ostream& print(std::ostream& os) const = 0;

    // class-level counter of distance calcs.  Used for performace testing.
    static int num_distance_calcs;
};

#endif
